import RPi.GPIO as GPIO
import time

if __name__=='__main__':
    GPIO.setmode(GPIO.BOARD)
    GPIO.setup(In_Pin1,GPIO.OUT,initial=GPIO.LOW)
    GPIO.setup(In_Pin2,GPIO.OUT)
    GPIO.setup(In_Pin3,GPIO.OUT,initial=GPIO.HIGH)
    p=GPIO.PWM(In_Pin2,150)

    p.start(0)

    try:
        while True:
            for dc in range (0,101,1):
                p.ChangeDutyCycle(dc)
                time.sleep(0.1)
            for dc in range (100,-1,-1):
                p.ChangeDutyCycle(dc)
                time.sleep(0.1)
    except KeyboardInterrupt:
        pass
    p.stop()
    GPIO.cleanup()